<template>
    <Div class="uesr-info">
        <Row class="user-title">
            <Avatar :src="url"></Avatar>
            <b>修改头像</b>
            <Label>管理员：{{ user_name }}</Label>
        </Row>
        <Row class="nav-btn">
            <Button :class="this.show ===1 ? 'active' : ''" @click="()=>{this.show = 1}">基本信息</Button>
            <Button :class="this.show ===2 ? 'active' : ''" @click="()=>{this.show = 2}">商户绑卡</Button>
            <Button :class="this.show ===3 ? 'active' : ''" @click="()=>{this.show = 3}">支付通道管理</Button>
        </Row>
        <Row v-if="show === 1">
            <own-info></own-info>
        </Row>
        <Row v-else-if="show === 2">
            <bind-bank></bind-bank>
        </Row>
        <Row v-else-if="show === 3">
            <own-pay></own-pay>
        </Row>
    </Div>
</template>

<script>
import Cookies from 'js-cookie';
import OwnInfo from './page/info.vue';
import BindBank from './page/bank.vue';
import OwnPay from './page/pay.vue';
export default {
    name: 'ownspace_index',
    components:{
        OwnInfo,
        BindBank,
        OwnPay
    },
    data(){
        return{
            url: localStorage.avatar,     //头像地址
            user_name: '',
            show: 1,
        }
    },
    methods:{
        init(){
            this.user_name = Cookies.get('user');
        }
    },
    mounted(){
        this.init();
    }
};
</script>
<style lang="less" scoped>
    @import './own-space.less';
</style>
